﻿using System;
using System.Collections.Generic;
using System.Text;
using Zoomtel.Entity.BIZ;
using Zoomtel.Persist.BIZ;

namespace Zoomtel.Service.BIZ
{
   public class WechatImgCacheService
    {

        private WechatImgCacheRepository repository;
        public WechatImgCacheService(WechatImgCacheRepository _repository)
        {
            repository = _repository;

        }

        public bool Exist(String itemId)
        {

          return  repository.Exists(a => a.itemId == itemId);

        }

        public WechatImgCacheEntity Get(string itemId)
        {

            return repository.FindEntity(a => a.itemId == itemId);
        }

        public int Add(WechatImgCacheEntity model)
        {

            return repository.Insert(model);
        }
    }
}
